//
//  HomePageTableViewCell.m
//  ClassRoom
//
//  Created by apple on 12-11-17.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import "HomePageTableViewCell.h"

@implementation HomePageTableViewCell

@synthesize title = _title,image = _image;

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
        UIImageView *cellBG = [[UIImageView alloc] initWithFrame:CGRectMake(self.frame.origin.x, self.frame.origin.y, self.frame.size.width, 82)];
        cellBG.image = [UIImage imageNamed:@"Home_TableViewCellBackGround_ImageView"];
        [self addSubview:cellBG];
        [cellBG release];
        
        _image = [[UIImageView alloc] initWithFrame:CGRectMake(40, 29, 30, 33)];
        _image.backgroundColor = [UIColor clearColor];
        [self addSubview:_image];
        
        _title = [[UILabel alloc] initWithFrame:CGRectMake(140, 16, 150, 50)];
        _title.backgroundColor = [UIColor clearColor];
        _title.font = [UIFont systemFontOfSize:30];
        _title.font = [UIFont fontWithName:@"Helvetica-Bold" size:23];
//        _title.text = @"搜课程";
        [self addSubview:_title];
        
        UIImageView *imageSign = [[UIImageView alloc] initWithFrame:CGRectMake(290, 32, 13, 20)];
        imageSign.image = [UIImage imageNamed:@"Arrowhead_Green"];
        [self addSubview:imageSign];
        [imageSign release];
    }
    return self;
}

- (void)setCellData:(NSString *)image ButtonTitle:(NSString *)title{
    _image.image = [UIImage imageNamed:[NSString stringWithFormat:@"%@",image]];
    _title.text = title;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
-(void)dealloc{
    [_title release];
    [_image release];
    
    [super dealloc];
}

@end
